package com.example.superjson;

import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class HomeActivity extends Activity {

	private ImageView imageView_settings;
	private FragmentManager manager;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_home);
		imageView_settings = (ImageView) findViewById(R.id.imageView_settings);
		imageView_settings.setOnClickListener(new ViewOnClickListener());
		manager = getFragmentManager();
		FragmentTransaction transaction = manager.beginTransaction();
//		transaction.replace(R.id.content, fragment);
		transaction.addToBackStack(null);
		transaction.commitAllowingStateLoss();
	}

	class ViewOnClickListener implements OnClickListener{
		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent intent = new Intent(getBaseContext(), LoginActivity.class);
			startActivity(intent);
		}
	}
}
